package com.census.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.sql.Date;

/**
 * Created by WangKai's Hands.
 * User:WangKai
 * Date:2017/7/9
 * Time:14:11
 * Email: 1786025737@qq.com
 */
@Entity
public class Audit {
    private int auditId;
    private String auditStatus;
    private String auditPersion;
    private String feedback;
    private Date commitDate;
    private Date auditDate;
    private String name;
    private String usedName;
    private String relation;
    private double height;
    private String job;
    private String faith;
    private String photo;
    private String politicesStuts;
    private String degree;
    private String marriage;

    @Id
    @Column(name = "audit_id")
    public int getAuditId() {
        return auditId;
    }

    public void setAuditId(int auditId) {
        this.auditId = auditId;
    }

    @Basic
    @Column(name = "audit_status")
    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    @Basic
    @Column(name = "audit_persion")
    public String getAuditPersion() {
        return auditPersion;
    }

    public void setAuditPersion(String auditPersion) {
        this.auditPersion = auditPersion;
    }

    @Basic
    @Column(name = "feedback")
    public String getFeedback() {
        return feedback;
    }

    public void setFeedback(String feedback) {
        this.feedback = feedback;
    }

    @Basic
    @Column(name = "commit_date")
    public Date getCommitDate() {
        return commitDate;
    }

    public void setCommitDate(Date commitDate) {
        this.commitDate = commitDate;
    }

    @Basic
    @Column(name = "audit_date")
    public Date getAuditDate() {
        return auditDate;
    }

    public void setAuditDate(Date auditDate) {
        this.auditDate = auditDate;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "used_name")
    public String getUsedName() {
        return usedName;
    }

    public void setUsedName(String usedName) {
        this.usedName = usedName;
    }

    @Basic
    @Column(name = "relation")
    public String getRelation() {
        return relation;
    }

    public void setRelation(String relation) {
        this.relation = relation;
    }

    @Basic
    @Column(name = "height")
    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    @Basic
    @Column(name = "job")
    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    @Basic
    @Column(name = "faith")
    public String getFaith() {
        return faith;
    }

    public void setFaith(String faith) {
        this.faith = faith;
    }

    @Basic
    @Column(name = "photo")
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Basic
    @Column(name = "politices_stuts")
    public String getPoliticesStuts() {
        return politicesStuts;
    }

    public void setPoliticesStuts(String politicesStuts) {
        this.politicesStuts = politicesStuts;
    }

    @Basic
    @Column(name = "degree")
    public String getDegree() {
        return degree;
    }

    public void setDegree(String degree) {
        this.degree = degree;
    }

    @Basic
    @Column(name = "marriage")
    public String getMarriage() {
        return marriage;
    }

    public void setMarriage(String marriage) {
        this.marriage = marriage;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Audit audit = (Audit) o;

        if (auditId != audit.auditId) return false;
        if (Double.compare(audit.height, height) != 0) return false;
        if (auditStatus != null ? !auditStatus.equals(audit.auditStatus) : audit.auditStatus != null) return false;
        if (auditPersion != null ? !auditPersion.equals(audit.auditPersion) : audit.auditPersion != null) return false;
        if (feedback != null ? !feedback.equals(audit.feedback) : audit.feedback != null) return false;
        if (commitDate != null ? !commitDate.equals(audit.commitDate) : audit.commitDate != null) return false;
        if (auditDate != null ? !auditDate.equals(audit.auditDate) : audit.auditDate != null) return false;
        if (name != null ? !name.equals(audit.name) : audit.name != null) return false;
        if (usedName != null ? !usedName.equals(audit.usedName) : audit.usedName != null) return false;
        if (relation != null ? !relation.equals(audit.relation) : audit.relation != null) return false;
        if (job != null ? !job.equals(audit.job) : audit.job != null) return false;
        if (faith != null ? !faith.equals(audit.faith) : audit.faith != null) return false;
        if (photo != null ? !photo.equals(audit.photo) : audit.photo != null) return false;
        if (politicesStuts != null ? !politicesStuts.equals(audit.politicesStuts) : audit.politicesStuts != null)
            return false;
        if (degree != null ? !degree.equals(audit.degree) : audit.degree != null) return false;
        if (marriage != null ? !marriage.equals(audit.marriage) : audit.marriage != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result;
        long temp;
        result = auditId;
        result = 31 * result + (auditStatus != null ? auditStatus.hashCode() : 0);
        result = 31 * result + (auditPersion != null ? auditPersion.hashCode() : 0);
        result = 31 * result + (feedback != null ? feedback.hashCode() : 0);
        result = 31 * result + (commitDate != null ? commitDate.hashCode() : 0);
        result = 31 * result + (auditDate != null ? auditDate.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (usedName != null ? usedName.hashCode() : 0);
        result = 31 * result + (relation != null ? relation.hashCode() : 0);
        temp = Double.doubleToLongBits(height);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        result = 31 * result + (job != null ? job.hashCode() : 0);
        result = 31 * result + (faith != null ? faith.hashCode() : 0);
        result = 31 * result + (photo != null ? photo.hashCode() : 0);
        result = 31 * result + (politicesStuts != null ? politicesStuts.hashCode() : 0);
        result = 31 * result + (degree != null ? degree.hashCode() : 0);
        result = 31 * result + (marriage != null ? marriage.hashCode() : 0);
        return result;
    }
}
